function fb_arr = fb_check(exp)

lt_win=1500;
rt_win=500;

adata_dir='\\argon.fmi.ch\keller.g\AData\';
[~,host] = dos('hostname');
if ~isempty(regexp(host,'rig1-aux', 'once'))
    data_dir='D:\tempData\S1-T';
else
    if length(exp)<2
        [~,mouse_id,userID]=find_adata_file(exp,adata_dir);
    else
        [~,mouse_id,userID]=find_adata_file(exp(1),adata_dir);
    end
    data_dir=['\\KELLER-RIG1-ANA\RawData\' userID '\' mouse_id '\S1-T'];
end

if length(exp)<2
    data=load_lvd([data_dir num2str(exp) '.lvd']);
    
%     checkAux(exp);
    
    [~,~,~,velM_ind,~,~]=get_vel_ind_from_adata(data);
    
    ori_pert=round(data(3,:)*2);
    pert=abs(ori_pert);
    pert=diff(pert)>0;
    
    cnt=1;
    pert_run=[];
    for und=1:length(pert)
        if pert(und)>0
            beg=und-lt_win;
            las=und+rt_win;
            if beg<0
                beg=1;
            end
            if las>length(pert)
                las=length(pert);
            end
            if sum(velM_ind(beg:las))==sum([lt_win rt_win 1])
                pert_run(cnt,1)=sum(velM_ind(beg:las));
                pert_run(cnt,2)=ori_pert(und+1);
                cnt=cnt+1;
            end
        end
    end
    
    if ~isempty(pert_run)
        un_val=unique(pert_run(:,2));
        per_arr=[];
        for ond=1:length(un_val)
            per_arr(ond,1)=un_val(ond);
            per_arr(ond,2)=sum(pert_run(:,2)==un_val(ond));
        end
        fb_arr=per_arr;
        figure;
        bar(fb_arr(:,1),fb_arr(:,2))
        ylim([0 max(fb_arr(:,2))]);
        xlim([min(unique(ori_pert)) max(unique(ori_pert))]);
        set(gca,'xtick',min(un_val):1:max(un_val))
        display([ num2str(sum(fb_arr(:,2))) ' perturbations out of ' num2str(sum(logical(pert))) ': ' num2str(round((sum(fb_arr(:,2))/sum(logical(pert)))*100)) '%'])
        display([ 'Running: ' num2str(round((sum(velM_ind)/length(velM_ind))*100)) '%']);
    else
        disp('No pert while running')
        disp(['Feedback pert window: ' num2str(lt_win) 's - pert onset - ' num2str(rt_win) 's'])
    end
else
    cnt=1;
    pert_run=[];
    tot_pert=0;
    tot_run=0;
    tot_t=0;
    for ynd=1:length(exp)
        
        data=load_lvd([data_dir num2str(exp(ynd)) '.lvd']);
        [~,~,~,velM_ind,~,~]=get_vel_ind_from_adata(data);
        
        ori_pert=round(data(3,:)*2);
        pert=abs(ori_pert);
        pert=diff(pert)>0;
        
        
        for und=1:length(pert)
            if pert(und)>0
                beg=und-lt_win;
                las=und+rt_win;
                if beg<0
                    beg=1;
                end
                if las>length(pert)
                    las=length(pert);
                end
                if sum(velM_ind(beg:las))==sum([lt_win rt_win 1])
                    pert_run(cnt,1)=sum(velM_ind(beg:las));
                    pert_run(cnt,2)=ori_pert(und+1);
                    cnt=cnt+1;
                end
            end
        end
        tot_pert=tot_pert+sum(logical(pert));
        tot_run=tot_run+sum(velM_ind);
        tot_t=tot_t+length(velM_ind);
    end
    if ~isempty(pert_run)
        un_val=unique(pert_run(:,2));
        per_arr=[];
        for ond=1:length(un_val)
            per_arr(ond,1)=un_val(ond);
            per_arr(ond,2)=sum(pert_run(:,2)==un_val(ond));
        end
        fb_arr=per_arr;
        figure;
        bar(fb_arr(:,1),fb_arr(:,2))
        ylim([0 max(fb_arr(:,2))]);
        xlim([min(unique(ori_pert)) max(unique(ori_pert))]);
        set(gca,'xtick',min(un_val):1:max(un_val))
        display([ num2str(sum(fb_arr(:,2))) ' perturbations out of ' num2str(tot_pert) ': ' num2str(round((sum(fb_arr(:,2))/tot_pert)*100)) '%'])
        display([ 'Running: ' num2str(round((tot_run/tot_t)*100)) '%']);
    else
        disp('No pert while running')
        disp(['Feedback pert window: ' num2str(lt_win) 's - pert onset - ' num2str(rt_win) 's'])
    end
end